package com.example.demo.service.impl;

import com.example.demo.dao.UserMapper;
import com.example.demo.pojo.Record;
import com.example.demo.pojo.User;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public int updateSelf(User user){
        return userMapper.updateSelf(user);
    }

    @Override
    public List<Record> selectAllRecordListOfMine(int Uid){
        return userMapper.selectAllRecordListOfMine(Uid);
    }

    @Override
    public int insertRecord(Record record){
        return userMapper.insertRecord(record);
    }

    @Override
    public User UserLogin(int Uid){
        return userMapper.UserLogin(Uid);
    }

    @Override
    public User getUserInfo(int Uid){
        return userMapper.getUserInfo(Uid);
    }
}
